trichview.support
Re: [FOLLOW] was : fastest way to use trichview |
Author |
Message |
ian |
Posted: 11/27/2004 0:17:23 Ok thanks Its too bad that this solution don't work ... : procedure TForm1.RVStyle2DrawStyleText(Sender: TRVStyle; const s: String; Canvas: TCanvas; StyleNo, SpaceBefore, Left, Top, Width, Height: Integer; DrawState: TRVTextDrawStates; var DoDefault: Boolean); var bitmap: tbitmap; begin if s=':)' then begin bitmap:=tbitmap.Create; bitmap := GetSmiley(s); canvas.Draw(left,top ,bitmap); bitmap.free; dodefault:=false; end; end; You don't want to past "left", "top", "width" to var, so user can make own draw and tell to richview where to do the next draw ?? :) so the working solution for me become : procedure TForm1.RVStyle2DrawStyleText(Sender: TRVStyle; const s: String; Canvas: TCanvas; StyleNo, SpaceBefore, Left, Top, Width, Height: Integer; DrawState: TRVTextDrawStates; var DoDefault: Boolean); var bitmap: tbitmap; begin if s=':)' then begin bitmap:=tbitmap.Create; bitmap := GetSmiley(s); canvas.Draw(left,top ,bitmap); inc(Left, bitmap.width); bitmap.free; dodefault:=false; end; end; For the moment i take your solution : a "pseudo" cache system who don't create new bmp for a bitmap who already exist .. Thanks |
Powered by ABC Amber Outlook Express Converter